package se.lnu.axez.textures;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public abstract class ResourceBitmapTexture2D extends BitmapTexture2D {
	private final Resources resources;
	
	public ResourceBitmapTexture2D(Resources resources) {
		this.resources = resources;
	}

	@Override
	protected Bitmap getBitmap() {
		return BitmapFactory.decodeResource(this.resources, getResourceID());
	}

	protected abstract int getResourceID();
}
